package com.beijiteshop.shop.data

import androidx.databinding.ObservableField
import androidx.databinding.ObservableInt
import com.beijiteshop.shop.model.entity.NotificationEntity
import com.beijiteshop.shop.model.entity.ShopCarProductEntity
import com.beijiteshop.shop.model.api.response.*
import com.beijiteshop.shop.model.entity.CheckBoxEntity
import com.beijiteshop.shop.model.entity.ProductDetailItemEntity
import com.beijiteshop.shop.model.entity.RefundEntity

object DataServer {

//    /**
//     * 获取限时抢购数据
//     */
//    fun getRushProductList(): List<ProductItemBean>{
//        val list = mutableListOf<ProductItemBean>()
//        list.add(ProductItemBean(ProductItemBean.TYPE_HEADER,2, ProductBean("","",null,0,0,0f,0f,null,
//            R.drawable.header_rush_product)))
//        for (i in 0..9){
//            list.add(ProductItemBean(ProductItemBean.TYPE_RUSH_GOODS,2,
//                ProductBean("https://img10.360buyimg.com/seckillcms/s250x250_jfs/t1/166176/40/5772/198249/6020d2aeEc83abbc8/2b4d05593782a578.jpg",
//                    "媚丽阳光抽纸20包", listOf("原生竹浆","母婴适用"),770,1000,17.80f,9.80f,null)))
//        }
//        return list
//    }
//
//    /**
//     * 获取精品推荐数据
//     */
//    fun getRecProductList(): List<ProductItemBean>{
//        val list = mutableListOf<ProductItemBean>()
//        list.add(ProductItemBean(ProductItemBean.TYPE_HEADER,2, ProductBean("","",null,0,0,0f,0f,null,
//            R.drawable.header_recommend_product)))
//        for (i in 0..9){
//            list.add(ProductItemBean(ProductItemBean.TYPE_REC_GOODS,1,
//                ProductBean("https://img14.360buyimg.com/seckillcms/s250x250_jfs/t1/156394/22/9086/202091/601ce610Eff76efe6/cd6db15fd2f49bb1.png",
//                    "郎酒炉火纯青礼盒", listOf("酱香型白酒","青花郎+红花郎15","53度500ml","礼盒2瓶装酒厂自营"),0,0,1699f,2099f,null)))
//        }
//        return list
//    }

    /**
     * 获取更多精品推荐数据
     */
//    fun getMoreRecProductList(): List<ProductItemBean>{
//        val list = mutableListOf<ProductItemBean>()
//        for (i in 0..9){
//            list.add(ProductItemBean(ProductItemBean.TYPE_REC_GOODS,1,
//                ProductBean("https://img12.360buyimg.com/n1/jfs/t1/111585/20/16975/100053/5f50c374Ee6cb7c04/5eace78043f2461c.jpg",
//                    "蒙牛 纯甄 常温风味酸牛奶 200g*24 礼盒装", listOf("爆品第2件半价","领券119再减20元"),0,0,64.99f,100f,null)))
//        }
//        return list
//    }

    /**
     * 获取消息列表
     */
    fun getNotificationList(): MutableList<NotificationEntity>{
        val list = mutableListOf<NotificationEntity>().apply {
            add(
                NotificationEntity(
                    "系统通知",
                    "订单信息",
                    ObservableField("暂无消息"),
                    ObservableInt(0)
                )
            )
        }
        return list
    }


    fun getImageUrls(): MutableList<String>{
        val list = mutableListOf<String>()
        list.add("https://img14.360buyimg.com/n0/jfs/t1/116602/18/13452/237201/5f20e949E8909a7d5/17d5e604477a49b0.jpg")
        list.add("https://img14.360buyimg.com/n0/jfs/t1/142840/10/4077/280045/5f20e948E3fa0395f/c5bc7f0d6c7638b9.jpg")
        return list
    }

    /**
     * 获取商品详情信息
     */
    fun getProductDetailItemBean(): MutableList<ProductDetailItemEntity>{
        val list = mutableListOf<ProductDetailItemEntity>()
        list.add(ProductDetailItemEntity(ProductDetailItemEntity.TYPE_HEADER_TITLE,2,"--用户评价--"))
//        for (i in 0..10){
//            list.add(ProductDetailItemEntity(ProductDetailItemEntity.TYPE_EVALUATION,2,EvaluationBean("骑蜗牛闯红灯$i","极好","味道针不戳","2021-03-04 19:25:56")))
//        }
        list.add(ProductDetailItemEntity(ProductDetailItemEntity.TYPE_HEADER_TITLE,2,"--精选好物--"))
        return list
    }

    /**
     * 获取商品颜色
     */
    fun getProductColors(): MutableList<CheckBoxEntity<String>>{
        val list = mutableListOf<CheckBoxEntity<String>>()
        list.add(CheckBoxEntity(true,"红"))
        list.add(CheckBoxEntity(false,"绿"))
        list.add(CheckBoxEntity(false,"蓝"))
        list.add(CheckBoxEntity(false,"黑"))
        list.add(CheckBoxEntity(false,"白"))
        list.add(CheckBoxEntity(false,"灰"))
        list.add(CheckBoxEntity(false,"紫"))
        list.add(CheckBoxEntity(false,"黄"))
        return list
    }

    /**
     * 获取商品规格
     */
    fun getProductSpecs(): MutableList<CheckBoxEntity<String>>{
        val list = mutableListOf<CheckBoxEntity<String>>()
        list.add(CheckBoxEntity(true,"227g/包"))
        list.add(CheckBoxEntity(false,"247g/包"))
        list.add(CheckBoxEntity(false,"267g/包"))
        list.add(CheckBoxEntity(false,"297g/包"))
//        list.add(CheckBoxBean(false,"327g/包"))
//        list.add(CheckBoxBean(false,"397g/包"))
//        list.add(CheckBoxBean(false,"427g/包"))
        return list
    }

    fun getAddresses(): MutableList<AddressBean>{
        val list = mutableListOf<AddressBean>()
        for (i in 0..2){
            list.add(
                AddressBean(
                    i.toString(),
                    "重庆市 重庆市 渝北区",
                    "小李子",
                    "金开大道棕榈泉国际中心",
                    "15730612737"
                )
            )
        }
        return list
    }

    fun getCoupons(): MutableList<Coupon>{
        val list = mutableListOf<Coupon>()
        for (i in 0..8){
            list.add(
                Coupon(
                    0,
                    "",
                    "优惠券$i",
                    50f,
                    "2021-04-08 10:29:09"
                )
            )
        }
        return list
    }

    fun getOrderDetails(): MutableList<OrderListBean>{
        val list = mutableListOf<OrderListBean>()
        val goods = mutableListOf<OrderGood>()
        for (i in 0 .. 3){
            goods.add(OrderGood("","",1,"德芙麦提莎麦丽素麦芽脆夹心原味巧克力球53g","19.9",
                "https://regulate.beijiteshop.cn/UploadGoodImgs/2021-01-20/39d98fed-41a2-46b2-a910-594dfdd4ed02.jpg","9.9","53g","白色"))
        }
        for (i in 0 .. 10){
            list.add(OrderListBean("7462bade-1472-4efc-b36d-70820d0b8089","小马云",
                "2021-03-10 18:22:34",goods,"202103101822340757592d","0",
                "115451122","送货上门","1.20"))
        }
        return list
    }

    fun getRefundList(): MutableList<RefundEntity>{
        val list = mutableListOf<RefundEntity>()
        list.add(
            RefundEntity(
                "2021-03-12 13:48:09",
                "提交退款申请【3.5】元,理由是测试"
            )
        )
        list.add(RefundEntity("处理中", null))
        list.add(
            RefundEntity(
                "2021-03-12 13:58:09",
                "处理成功"
            )
        )
        return list
    }

}